<!doctype html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>Vv - 排名助手</title>
    <meta name="description" content="VV,Vv排名助手,排名助手,排名软件,竞价软件,调价软件,查看百度推广异地排名." />
    <meta name="keywords" content="VV,Vv排名助手,排名助手,排名软件,竞价软件,调价软件,查看百度推广异地排名" />
    <link href="/static/style.css" rel="stylesheet" type="text/css"/>
    <script language="javascript" type="text/javascript" src="/static/util.js"></script>
    <script language="javascript" type="text/javascript" src="/static/jquery.min.js"></script>
    <script language="javascript" type="text/javascript" src="/static/jquery.url.js"></script>
    <script language="javascript" type="text/javascript" src="/static/jquery.cookie.js"></script>
</head>
<body>
<div style="width: 600px;margin: 100px auto 0;">
<form action="/<%-searchPath%>" onsubmit="return parent.go(document.getElementById('url').value)">
    <div>
        <b style="font-size: 16px;color: #336699;">网址</b>:
        <input type="text"  value="例如输入:www.baidu.com" data="例如输入:www.baidu.com" name="url" id="url" class="inp" style="width: 500px;height: 20px;"/>
    </div>
    <div style="width: 600px;margin: 0 auto 0;text-align:center;">
    <select id="use_url" class="sel" onchange="changeUseUrl(this)"><option value="0">常用网址</option></select>
    <input type="submit" value="搜索" class="btn" style="font-size: 16px;"/>
    <input type="button" value="清空网址" class="btn"  style="font-size: 16px;" onclick="clearUrl();"/>
    </div>
</form>
</div>
<script>
    function clearUrl(){
        document.getElementById("url").value="";
    }
    function setUseUrl(){
        var use_url = $.cookie('use_url');
        var optionStr = '<option value="0">常用网址</option>';
        if(use_url!=undefined && use_url!=""){
            var arr = use_url.split("#");
            var len = arr.length;
            for(var i=0;i<len;i++){
                optionStr += '<option value="'+arr[i]+'">'+arr[i]+'</option>'
            }
            $("#use_url").html(optionStr);
        }
    }
    function changeUseUrl(){
        parent.go($('#use_url').val());
    }


    setUseUrl();
    $("#url").focus(function(){
        if( $.trim($(this).val()) == $.trim($(this).attr("data"))){
            $(this).val("");
        }
    });
    $("#url").blur(function(){
        if( $.trim($(this).val()) == ""){
            $(this).val( $.trim($(this).attr("data")) );
        }
    });
</script>
</body>
</html>